#include "util.hpp"
#include "message.hpp"
#include <time.h>

using namespace ad_log;

void utilTest()
{
    cout << util::date::currentTime() << endl;
    cout << util::file::isExist("util.hpp") << endl;

    cout << util::file::fileDirectoryPath("util.hpp") << endl;
    cout << util::file::fileDirectoryPath("") << endl;
    util::file::createDirectory("dir1/dir1-1");
    util::file::createDirectory("../dir2");
    cout << util::file::fileDirectoryPath("dir1") << endl;
    cout << util::file::fileDirectoryPath("dir1/dir1-1") << endl;
}

void messageTest()
{
    LogMessage msg1(__LINE__, __FILE__, ad_log::LogLevel::level::DEBUG, "this is a test", "name");
    LogMessage msg2(__LINE__, __FILE__, ad_log::LogLevel::level::INFO, "this is a test as well", "name");
    cout << LogLevel::toString(msg1.logLevel_) << endl;
    cout << LogLevel::toString(msg2.logLevel_) << endl;
}

int main()
{ 
    //utilTest();
    messageTest();
    return 0;
}